import { refreshToken } from '@/service'
// import { useAuthStore } from '../../stores/modules/auth'
// import { useAuthStore } from '@/stores/modules/auth/index'

/**
 * @param axiosConfig - token失效时的请求配置
 */
export async function handleRefreshToken() {
    // const { resetAuthStore } = useAuthStore()
    const { error, result } = await refreshToken()
    if (error) {
        // resetAuthStore()
        return Promise.reject()
    }

    return Promise.resolve(true)
}
